package vn.appsmobi.activity;

import vn.appsmobi.R;
import vn.appsmobi.ui.PromotionFragment;
import vn.appsmobi.ulti.Constant;
import vn.appsmobi.ulti.Log;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.Menu;

public class PromotionActivity extends BaseActivity {

	@Override
	protected Fragment newFragmentByTag(String tag)
	  {	 
		Log.v("FRAGMENT_TAG_LOCALAPP");
		Fragment localappFragment = null;
	    if (TextUtils.equals(tag, Constant.FRAGMENT_TAG_PROMOTION))
	    {
	       localappFragment = new PromotionFragment();	     
	    }
		return localappFragment;
	    
	  }
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if(null == savedInstanceState)
		{
			super.setDisplayShowCustomEnabled(false);
			showFragment(Constant.FRAGMENT_TAG_PROMOTION, savedInstanceState, false);
			setHomeButtonEnable(true);
			setBarTitle(getString(R.string.localapp_promotion));
		}		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.search, menu);
		return true;
	}

}
